ElementType Median(ElementType A[], int N)
{
	//交换排序法
	for (int i = 0; i < N - 1; i++)
	{
		for (int j = i + 1; j < N; j++)
		{
			ElementType tmp;
			if (A[j] < A[i])
			{
				tmp = A[i];
				A[i] = A[j];
				A[j] = tmp;
			}
		}
	}
	return A[N / 2];
}